Yeah, but I doubt they’ll make that mistake again π
Submit a request in trac, however. I doubt it’ll be removed, though, since a lot of people find it amusing.
Well if it was an error message, rather than something that looked like a virus, then perhaps they wouldn’t make the mistake again. As it stood they had no idea they had made a mistake.
Obviously a more intuitive approach would to simply not let you select a comparison on the same version.
Humour has its place, if its inclusive π
I’ll see what the feedback is like here, if people agree I’ll pop something on trac.
Anonymous User
(@anonymized-3085)
I think it should stay, but perhaps its time to add a hook to allow those that want to change it.
@ianatkins – I ran into the same problem with a client. I took some time to write a quick patch to prevent this from happening with my needier clients in the future:
function prevent_matrix_easter_egg() {
$left = empty( $_POST['left'] ) ? ( empty( $_GET['left'] ) ? '' : $_GET['left'] ) : $_POST['left'];
$right = empty( $_POST['right'] ) ? ( empty( $_GET['right'] ) ? '' : $_GET['right'] ) : $_POST['right'];
if($left == $right) {
$redirect = get_edit_post_link( $left );
wp_die("Error: Cannot compare a revision to itself.<br /><a href=\"" . $redirect . "\">Go Back</a>");
}
}
add_action('admin_action_diff', 'prevent_matrix_easter_egg');
This will override the Matrix message and instead present a standard WordPress “you can’t do that” error. It might not be the best way to do it, but it works for now. In the mean time, I’m running a quick contest on WordPress Answers to see if anyone can come up with a more elegant solution.
Wow nice one Eric, thanks for sharing.
I guess the more elegant solution would be the removal from core!
Thanks again.
I agree with removing it – especially since most users are “not” techno savvy and use blogs as a business. I was at first shocked to find it. Even with the “Go Back” – I still wasn’t sure if my blog had been hacked or not – and I am sure my clients would be calling me day and night — It looked like a virus. There should be an option to remove.
This will be addressed in a future release.
http://core.trac.ww.wp.xz.cn/ticket/12816
+1 for removing it… at least for sub-sites in a multi-site network setup where it is likely to cause some panick π
in the mean time, the winner of Eric Mann’s contest on http://wordpress.stackexchange.com/questions/3253/coding-challenge-javascript-easter-egg/ is a pretty easy work-around when thrown in /mu-plugins/
+1
there should be option to turn off Revision & Draft feature
at least those who dnt want this can turn it off